import request from '@/utils/request'

// 获取一段时间内分成总数
export const getTotalBill = (start, end) => request.get('/api/order-service/report/totalBill', { params: { start, end } })

// 搜索by Id
// 销售量
export const getOrderCountById = (start, end, partnerId) => request.get('/api/order-service/report/orderCount', { params: { start, end, partnerId } })
// 销售额
export const getOrderAmountById = (start, end, partnerId) => request.get('/api/order-service/report/orderAmount', { params: { start, end, partnerId } })
// 分成
export const getTotalBillById = (start, end, partnerId) => request.get('/api/order-service/report/totalBill', { params: { start, end, partnerId } })

// 合作商搜索
export const searchPartner = () => request.get('/api/user-service/partner/search',
  {
    params: {
      pageIndex: 1,
      pageSize: 100000
    }
  })

// 获取一定日期范围之内的合作商分成汇总数据 表格数据 /api/order-service/report/partnerCollect
export const getPartnerCollect = (params) => request.get('/api/order-service/report/partnerCollect', { params })
